<?php
//session_start();
date_default_timezone_set("Asia/Chongqing");
include("../public/common.php");
include("../config/connect.php");

$tb_id = "";
$userid = isset($_COOKIE["gwt_userid"]) ? $_COOKIE["gwt_userid"] : "";
$ref = CheckUrlParamNoDie("ref");
if ($ref=="")	$ref = "./";
$tbid = trim(GetPostParamStr("lx_name"));
$psw = trim(GetPostParamStr("lx_psw"));

//echo $userid.'******';
$row = mysql_fetch_assoc(mysql_query("select password from user where id=$userid limit 1"));
$paw = $row["password"];
if($paw == "")
{
	$url = "Location:add_psw.php?id=$userid&ref=".$ref;
	header($url);
	exit;
}
else if (HasLogin())
{
	$url = "Location:".$ref;
	header($url);
	exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name ="keywords" content="购物兔,购物兔返现网,购物兔省钱浏览器,聚划算返利,返现网,返利网,返利,淘宝网返利,商城返利,京东返利,淘宝网女装返利,淘宝网女鞋打折,淘宝网男装促销,淘宝网包包秒杀,淘宝化妆品赠送"/>
<meta name="Description" content="购物兔是国内最知名的购物省钱浏览器，返现最快，当天内直接到账，返现最安全，100%不漏单；无论您在淘宝网，还是京东、当当等其他商城购物，即使是促销价也能返现，实现折上再打折，真正省钱，是您网络购物省钱的首选！" />
<title>登录购物兔返现网-去淘宝网、京东、当当等商城购物，确认收货即可拿现金，赚兔币，换礼品！</title>
<?php
if( $tbid != "" && $psw != "" )
{
	$sql = "select * from user where tb_id='$tbid' limit 1";
	$result = mysql_query( $sql );
	if (mysql_num_rows($result) > 0)
	{
		$row = mysql_fetch_assoc( $result );
		if ($row["password"] != "")
		{
			if (md5($psw) == $row["password"])
			{
				setcookie("gwt_userid", $row["id"],time()+100*3600*24, "/",".gouwutu.com");
				setcookie("gwt_zfb", "$tbid",time()+100*3600*24, "/",".gouwutu.com");
				setcookie("gwt_nickname", $row["nick_name"],time()+100*3600*24, "/",".gouwutu.com");
				setcookie("gwt_phone", $row["phone"],time()+100*3600*24, "/",".gouwutu.com");
				setcookie("gwt_email", $row["email"],time()+100*3600*24, "/",".gouwutu.com");
				$url = "Location:".$ref;
				header($url);
			}
			else
			{
				echo "<script>alert('密码错误！');</script>";
			}
		}
		else
		{
			echo "<script>if(confirm('您还没有设置密码，马上去设置？'))location='add_psw.php?id=".$row["id"]."'</script>";
			//javascript:if(confirm('确实要删除吗?'))location='?opt=del&id=<?php echo $row["id"];
			//$url = "Location:add_psw.php?id=".$row["id"]."";
			//header($url);
			//exit;
		}
	}
	else
	{
		echo "<script>alert('不存在的账号！');</script>";
	}
}
?>
<style type="text/css">
body {font-size: 12px;color:#000;font-family: 宋体;}
.STYLE1 {font-size: 13px;font-weight: bold;}
table {border-collapse:collapse; border-spacing:2px;  font-size:12px;}
td,th { display:table-cell; vertical-align:inherit;}
img { border:0; vertical-align:top;}
#submint_btn { border-width:1px; border-color:#Fe0 #Fa0 #Fb0 #Fd0; border-style:solid; background:#Fc0; width:80px; height:30px; line-height:30px; font-size:14px; color:#fff; font-weight:bold;}
</style>
<script type="text/javascript">
function sPassword()
{
	var lx_name=document.getElementById("lx_name").value;
	var lx_psw=document.getElementById("lx_psw").value;
	if(lx_name.length==0 && lx_psw.length==0){
		alert("账号和密码输入错误！");
		return false;
	}
	
	return true;
}
</script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="920" border="1" cellpadding="0" cellspacing="0" align="center" bordercolor="#a8a8a8">
<tr>
	<td>
    <table width="920" height="102" border="0" align="center" cellpadding="0" cellspacing="0" background="images/bar_bg.gif" >
   		<tr>
        	<td width="230" valign="top">&nbsp;</td>
        	<td width="275" valign="top"><img src="images/bar_left_bg.gif" width="107" height="82" /></td>
        	<td width="415" valign="top"><img src="images/user_n.gif" width="407" height="102" /></td>
      	</tr>
 	</table>
    <table width="920" align="center" cellpadding="0" cellspacing="0" border="0" style="background:#eee;">
  		<tr>
    		<td height="40" colspan="2"></td>
  		</tr>
  		<tr>
  			<td height="15" colspan="2" style="background:url(images/bg2011110701.jpg) no-repeat center top;"></td>
  		</tr>
  		<tr>
        	<td width="500"><img src="images/login_bg.jpg" width="495" height="354" alt="" /></td>
  			<td>
            <form id="pawForm" action="" method="post" onsubmit="return sPassword();">
            <table cellspacing="1" cellpadding="2" border="0">
            	<td><font color="#000000" size="3"><b>登录个人中心：</b></font></td>
                <tr height="45">
                    <td>支付宝账号:</td>
                    <td></span><input type="text" name="lx_name" id="lx_name" value="<?PHP if (isset($_COOKIE["gwt_zfb"])) echo $_COOKIE["gwt_zfb"]; ?>" style="width:200px;" /></td>
                    <td id="paw5"></td>
                </tr>
                <tr height="45">
                    <td>购物兔密码:</td>
                    <td></span><input type="password" name="lx_psw" id="lx_psw" value="" style="width:200px;" /></td>
                    <td id="paw5"></td>
                </tr>
                <tr height="45" align="center">
                    <td colspan="2"><div align="right">
                      <input type="submit" style="cursor:pointer;" name="submit" id="submint_btn" value="登 录" />
                    &nbsp;<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=1753949757&amp;site=qq&amp;menu=yes">忘记密码？请找客服</a></div></td>
                    <td></td>
                </tr>
                <tr height="30"><td></td></tr>
            </table>
            </form>
            </td>
    	</tr>
        <tr>
  			<td height="45" colspan="2" style="background:url(images/bg2011102603.jpg) no-repeat center top;"></td>
  		</tr>
   	</table>
    </td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" border="0" align="center" width="920">
<tbody><tr>
	<td height="30" width="537" style="padding-left:5px; font-size:12px; color:#666">冰峰科技旗下购物兔 CopyRight 2011 gouwutu.com 粤ICP备11009208号</td>
    <td width="241"><span style="font-size:12px; color:#666">在线QQ客服：<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&amp;uin=1753949757&amp;site=qq&amp;menu=yes"><img border="0" align="absmiddle" alt="点击和我们交流" src="http://wpa.qq.com/pa?p=2:1753949757:42" title="欢迎点击和我们交流"></a>&nbsp;&nbsp;&nbsp;</span></td>
    <td align="right" height="30" width="142" style="font-size:12px; color:#666"><a style="font-size:12px; color:#666; font-weight:400; text-decoration:underline" target="_blank" href="mailto:admin@gouwutu.com">联系我们</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
</tr>
</tbody></table>
</body>
</html>